package com.ff.xyh.common.vo.message;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @Auther FF
 * @Date 2022年 12月 01日
 * @Time 00:39
 */

@Data
@Accessors(chain = true)
public class ActionTypeAndRoomMessage {
    private int actionType;
    private Map<String, RoomMessageVo> messageBody;

    public static ActionTypeAndRoomMessage type(int actionType) {
        ActionTypeAndRoomMessage msg = new ActionTypeAndRoomMessage();
        msg.setActionType(actionType);
        return msg;
    }
    public ActionTypeAndRoomMessage data(String key, RoomMessageVo value) {
        if (this.getMessageBody() == null) {
            this.messageBody = new HashMap<>();
        }
        this.messageBody.put(key, value);
        return this;
    }

}
